﻿<%@ Page Title="" Language="C#" MasterPageFile="~/promo/promotion.master" AutoEventWireup="true" CodeFile="rsa-promo-travel-insurance-results.aspx.cs" Inherits="promo_rsa_promo_travel_insurance_results" %>

<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/controls/usrPhoneNo.ascx" TagName="usrPhoneNo" TagPrefix="uc1" %>
<%@ Register Src="../controls/usrIdNumber.ascx" TagName="usrIdNumber" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<!--Start Page Title, Keywords, Description-->
    <!--Check server side (title, keywords, description) creating source code on Page_Load-->
    <asp:Label ID="lblPageTile" Text="RSA Singapore Travel Insurance Results" runat="server" Visible="false"></asp:Label>
    <asp:Label ID="lblKeywords" Text="travel insurance, single trip, annual multi traveling, rsa singapore" runat="server" Visible="false"></asp:Label>
    <asp:Label ID="lblDescription" Text="20% off single trips and 20% off annual travel insurance plans. You can buy now and travel later to take advantage of this promotion."
        runat="server" Visible="false"></asp:Label>
    <!--END Page Title, Keywords, Description-->
    <asp:ScriptManager ID="ScriptManager" runat="server">
    </asp:ScriptManager>

    <!--[if lte IE 6]>
        <link rel="stylesheet" type="text/css" href="/css/IE6.css" />
    <![endif]-->
    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=90);
            opacity: 0.8;
        }
    </style>

    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>

    <%--
    <script type="text/javascript" src="../js/jquery.tinyscrollbar.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {

            setTimeout('hookScroll()', 1000);

        });

        function hookScroll() {
            $('#scrollbar1').tinyscrollbar();

        }
       
    </script>--%>
    <div class="elements_inner_wrapper">
        <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
        <!-- #Include file="../includes/body_loader.inc" -->
        <script type="text/javascript">
            IncreaseProgress(10);
        </script>

        <div id="divContent" style="display: none;">
            <div class="form_selection" id="divFormSelection" runat="server">
                <div class="selection_wrap">
                    <span class="fs_lbl">Trip Type : </span>
                    <asp:Label ID="lblTripType" class="fs_lbl_m" runat="server" />
                    <span class="fs_lbl_r">Type of Policy : </span>
                    <asp:Label ID="lblPolicy" class="fs_lbl_m" runat="server" />
                    <span class="fs_lbl_r">Destination : </span>
                    <asp:Label ID="lblDestination" class="fs_lbl_m" runat="server" />
                    <span class="fs_lbl_r">Travel Date : </span>
                    <asp:Label ID="lblTravelDate" runat="server" class="fs_lbl_m" />
                    <span class="fs_lbl_r">No. of Traveller/s : </span>
                    <asp:Label ID="lblTravellers" class="fs_lbl_m" runat="server" />
                </div>
            </div>
            <div id="divNoResultMessage" runat="server" visible="false"><br />
             <asp:Label ID="lblNoResult" Text="No result. Please try again." runat="server"></asp:Label><br /><br />
            </div>
           
            <div id="divTravelResults" runat="server">
            <div class="seperator"></div>
            <h1>Your Travel Insurance Results</h1>
            <table cellpadding="0" cellspacing="0" border="0" class="table_details" id="tblBuyTop">
                <tr id="trTopOptionsTop" runat="server">
                    <td runat="server" id="tdTopPadTop">
                    </td>
                </tr>
                <tr id="trBuyTop" runat="server">
                    <td class="pad4px txtleft border1pxdotb_light">
                        <strong>Buy Online</strong>
                    </td>
                </tr>
                <tr id="trBottomOptionsTop" runat="server">
                    <td>
                    </td>
                </tr>
            </table>
            <br />
            <table cellpadding="0" cellspacing="0" border="0" class="table_details" id="tblTravelDetails"
                runat="server">
                <tr id="trTop" runat="server">
                    <td>
                    </td>
                </tr>
                <tr id="trProvider" runat="server">
                    <td>
                    </td>
                </tr>
                <tr id="trPlan" runat="server">
                    <td class="pad4px txtleft">
                        <strong>Plan</strong>
                    </td>
                </tr>
                <tr id="trPrice" runat="server">
                    <td class="bg_grey_5 txtleft pad4px">
                        <strong>Premium</strong>
                    </td>
                </tr>
                <%--  </table>--%>
                <%--<div>--%>
                <%--  <div class="scrollbar">
                    <div class="track">
                        <div class="thumb">
                            <div class="end">
                            </div>
                        </div>
                    </div>
                </div>--%>
                <%--   <div class="viewport">
                    <div class="overview">--%>
                <%--  <table cellpadding="0" cellspacing="0" border="0" id="tblTravel2" class="table_details">--%>
                <tr id="trPAadult" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Personal Accident</strong><br />
                        (adult)
                    </td>
                </tr>
                <tr id="trPA70" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Personal Accident</strong> (senior)
                    </td>
                </tr>
                <tr id="trDoubleIadult" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Double Indemnity</strong> (adult)
                    </td>
                </tr>
                <tr id="trDoubleI70" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Double Indemnity</strong> (senior)
                    </td>
                </tr>
                <tr id="trMedExpadult" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Medical Expenses</strong> (adult)
                    </td>
                </tr>
                <tr id="trMedExp70" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Medical Expense</strong>(senior)
                    </td>
                </tr>
                <tr id="trEmergencyMedEvac" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Emergency Medical Evacuation</strong>
                    </td>
                </tr>
                <tr id="trRepatriation" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Repatriation & Funeral Expenses</strong>
                    </td>
                </tr>
                <tr id="trHospIncome" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Hospital Income</strong>
                    </td>
                </tr>
                <tr id="trPregnancy" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Pregnancy-related Illness</strong>
                    </td>
                </tr>
                <tr id="trComVisit" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Overseas Compassionate Visit</strong>
                    </td>
                </tr>
                <tr id="trChildGuard" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Child Guard</strong>
                    </td>
                </tr>
                <tr id="trPersonalLiability" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Personal Liability</strong>
                    </td>
                </tr>
                <tr id="trLossBaggage" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Loss Baggage & Personal Effects</strong>
                    </td>
                </tr>
                <tr id="trOverseasBaggage" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Overseas Baggage Delay</strong>
                    </td>
                </tr>
                <tr id="trTripCancellation" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Trip Cancellation</strong>
                    </td>
                </tr>
                <tr id="trTripCurtailment" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Trip Curtailment</strong>
                    </td>
                </tr>
                <tr id="trTravelDelay" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Overseas Travel Delay</strong>
                    </td>
                </tr>
                <tr id="trTravelConnection" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Missed Travel Connection</strong>
                    </td>
                </tr>
                <tr id="trTravelOverbooked" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Travel Overbooked</strong>
                    </td>
                </tr>
                <tr id="trLossMoney" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Loss of Personal Money</strong>
                    </td>
                </tr>
                <tr id="trLossDocument" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Loss of Travel Documents</strong>
                    </td>
                </tr>
                <tr id="trClosureAgency" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Closure of Travel Agency</strong>
                    </td>
                </tr>
                <tr id="trHomeContent" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Home Contents Protection</strong>
                    </td>
                </tr>
                <tr id="trRentalVehicle" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Rental Vehicle Excess</strong>
                    </td>
                </tr>
                <tr id="trHijack" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Hijack</strong>
                    </td>
                </tr>
                <tr id="trKidnap" runat="server">
                    <td class="border1pxdotb_light txtleft pad4px">
                        <strong>Kidnap/Hostage</strong>
                    </td>
                </tr>
                <tr id="trTelCharge" runat="server">
                    <td class="txtleft pad4px">
                        <strong>Emergency Telephone Charges</strong>
                    </td>
                </tr>
                <tr id="trPolicy" runat="server">
                    <td class="txtleft pad4px">
                        <strong>View Policy Wordings</strong>
                    </td>
                </tr>
                <tr id="trBottom" runat="server">
                    <td>
                    </td>
                </tr>
            </table>
            <%--</div>
                </div>--%>
            <%--</div>--%>
            <%-- <table cellpadding="0" cellspacing="0" border="0" class="table_details" id="tblBottom"
                runat="server">
                <tr id="trBottom" runat="server">
                    <td>
                    </td>
                </tr>
            </table>--%>
            <div class="seperator_15px">
            </div>
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr>
                    <td runat="server" id="tdBarLeft">
                    </td>
                    <td class="txtcenter" align="center">
                        <div class="hilite" style="width: 560px;" id="divBar" runat="server">
                            <div class="left">
                            </div>
                            <div class="content txtcenter" style="width: 548px" id="divCenterBar" runat="server">
                                <div class="pad4px">
                                    <strong>Interested in one of these offers?</strong></div>
                            </div>
                            <div class="right">
                            </div>
                        </div>
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
                IncreaseProgress(35);
            </script>

            <table cellpadding="0" cellspacing="1" width="100%" border="0" class="table_details"
                id="tblArrows">
                <tr id="trArrows" runat="server">
                    <%--<td class="w312px" runat="server" id="tdArrowLeftAlign">
                    </td>--%>
                    <td runat="server" id="tdArrowLeftAlign">
                    </td>
                </tr>
            </table>
            <div class="seperator">
            </div>

            <script type="text/javascript">
                IncreaseProgress(50);
            </script>

            <table cellpadding="0" cellspacing="0" border="0" class="table_details" id="tblOptions">
                <tr id="trTopOptions" runat="server">
                    <td class="w480px" runat="server" id="tdTopPad">
                    </td>
                </tr>
                <tr id="trBuyOnline" runat="server">
                    <td class="pad4px txtleft border1pxdotb_light">
                        <strong>Buy Online</strong>
                    </td>                    
                </tr>
                <%--<tr id="trEmailMe" runat="server">
                    <td class="pad4px txtleft border1pxdotb_light">
                        <strong>Email</strong>
                    </td>
                </tr>--%>
                <tr id="trEmailThis" runat="server">
                    <td class="pad4px txtleft">
                        <strong>Email This</strong>
                    </td>
                </tr>
                <tr id="trBottomOptions" runat="server">
                    <td>
                    </td>
                </tr>
            </table>

            <script type="text/javascript">
                IncreaseProgress(75);
            </script>

            <div class="seperator">
            </div>
            <div class="seperator">
            </div>
            <div class="seperator_dashed">
            </div>
            <div class="seperator">
            </div>
            <div style="padding: 15px; border: 1px solid #d1d1d1; background: #eeeeee; line-height: 35px;">
                <div class="blacklbl">
                    <h1>
                        Important Notes:</h1>
                </div>
                <div class="blacksmall" style="color: #313131">
                    • The amounts listed in the benefits table are the maximum coverage payable for
                    each benefit.<br />
                    • Coverage intended for overseas traveling and not in Singapore. Insured person
                    must be Singaporean or Singapore Permanent Resident only.<br />
                    • Information displayed here is a summary. Please read the actual policy wordings
                    for details of coverage.
                </div>
            </div>
            </div>
            <div class="seperator">
            </div>
            <asp:Button runat="server" ID="btnBack" Visible="true" onmousedown="this.className = 'button_back_mousedown';"
                onmouseup="this.className = 'button_back';" onmouseout="this.className = 'button_back';"
                CssClass="button_back" CausesValidation="false" OnClientClick="if (Page_ClientValidate('none')){this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className = 'button_processing';} return true;"
                OnClick="btnBack_Click" />
            <div style="display: none;">
                <asp:LinkButton runat="server" ID="lnkbtnPopup" Text="click"></asp:LinkButton>
                <input id="inputProviderId" runat="server" type="hidden" />
                <input id="inputTAId" runat="server" type="hidden" />
                <input id="inputPlanType" type="hidden" runat="server" />
                <input id="inputPlanName" type="hidden" runat="server" />
                <input id="inputPremium" type="hidden" runat="server" />
                <input id="inputResultId" type="hidden" runat="server" />
                <input id="inputUserId" type="hidden" runat="server" />
                <input id="inputNoOfAdult" type="hidden" runat="server" />
            </div>
            <cc1:ModalPopupExtender ID="mpePopup" runat="server" DropShadow="true" PopupControlID="pnlPopup"
                BackgroundCssClass="modalBackground" TargetControlID="lnkbtnPopup" CancelControlID="btnClose"
                BehaviorID="mdlPopup">
            </cc1:ModalPopupExtender>
            <!-- Call to Action Popup | Start -->
            <asp:Panel ID="pnlPopup" runat="server" Style="display: none; background: white;"
                Width="595px" Height="295px">
                <div id="divPopup" style="padding: 10px; padding-top: 0px; height: 305px;">
                    <div style="width: 100%; height: 30px; text-align: right; margin-top: 3px;">
                        <div class="left" style="font-size: 11px; color: #0098cc; padding: 13px 0 0 15px">
                            <strong>CompareXpress Exclusive</strong>: You won't find a cheaper package on any
                            other websites!</div>
                        <div class="bg_grey_5 pad4px txtright" style="width: 560px; text-align: right;">
                            <a href="#" name="ctl00$ContentPlaceHolder1$btnClose" onclick="HidePanel();" id="A1">
                                <img src="/images/spacer.gif" id="btnClose" border="0" class="button_close" width="75"
                                    height="30" alt="Close" /></a>
                        </div>
                    </div>
                    <div class="seperator_15px">
                    </div>
                    <div class="seperator_15px">
                    </div>
                    <table cellpadding="0" cellspacing="0" border="0" class="table_details" style="width: 580px;">
                        <tr>
                            <td width="220">
                            </td>
                            <td class="bg_grey_2" width="360">
                                <div>
                                    <div class="curvetopleft left">
                                    </div>
                                    <div class="curvetopright right">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad4px border1pxdotb_light">
                            <b>Plan: <label id="lblPlanName" ></label></b>
                         
                            </td>
                            <td class="bg_grey_2 pad4px border2pxdotb">
                               <b>Premium: S$<label id="lblPremium" ></label></b>
                                <asp:Label ID="lblMessage" ForeColor="Red" runat="server"></asp:Label>
                                <asp:ValidationSummary ID="ValidationSummary1" CssClass="errorSummary" HeaderText="Oops... Please complete the form"
                                    runat="server" ValidationGroup="emailthis" />
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad4px border1pxdotb_light">
                                <strong>Your Name</strong>
                            </td>
                            <td class="txtleft bg_grey_2 pad4px border2pxdotb">
                             <div class="padl10px">
                                <asp:TextBox ID="txtFullName" Width="250" MaxLength="80" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvFullName" runat="server" ControlToValidate="txtFullName"
                                    CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="revFullName" runat="server" ValidationGroup="travel_insurance"
                                    ValidationExpression="^[a-zA-Z''-'\s]{1,80}$" CssClass="validationErrorControl"
                                    ControlToValidate="txtFullName" ErrorMessage=""></asp:RegularExpressionValidator>
                                    </div>
                            </td>
                        </tr>
                        <tr id="trYourTitle" style="display: none;">
                            <td class="txtleft pad4px border1pxdotb_light">
                                <strong>Your Title</strong>
                            </td>
                            <td class="txtleft bg_grey_2 pad4px border2pxdotb">
                             <div class="padl10px">
                                <asp:DropDownList ID="ddlTitle" runat="server">
                                    <asp:ListItem Value="M">Mr.</asp:ListItem>
                                    <asp:ListItem Value="S">Ms.</asp:ListItem>
                                    <asp:ListItem Value="R">Mrs.</asp:ListItem>
                                    <asp:ListItem Value="D">Dr.</asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvTitle" runat="server" ControlToValidate="ddlTitle"
                                    CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>
                                    </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad4px border1pxdotb_light">
                                <strong>Your E-mail</strong>
                            </td>
                            <td class="txtleft bg_grey_2 pad4px border2pxdotb">
                            <div class="padl10px">
                                <asp:TextBox ID="txtEmail" runat="server" Width="250" MaxLength="100"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvEmail" CssClass="validationErrorControl" runat="server"
                                    ValidationGroup="travel_insurance" ErrorMessage="" Text="" ControlToValidate="txtEmail"
                                    Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator CssClass="validationErrorControl" ID="cxvEmail" runat="server"
                                    ValidationGroup="travel_insurance" ErrorMessage="" Text="" ControlToValidate="txtEmail"
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                    </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad4px border1pxdotb_light">
                                <strong>Your Mobile Number</strong>
                            </td>
                            <td class="txtleft bg_grey_2 pad4px border2pxdotb">
                             <div class="padl10px">
                                <uc1:usrPhoneNo ID="txtMobileNo" IsEnabled="true" IsRequired="true" PhoneNoRequireErrorMessage="Require mobile number."
                                    PhoneNoErrorMessage="Mobile phone number should 8 digits." PhoneNoValidErrorMessage="Invalid mobile phone number."
                                    runat="server" ValidationGroup="travel_insurance" />
                                    </div>
                            </td>
                        </tr>
                        <tr id="trYourNRIC" style="display: none;">
                            <td class="txtleft pad4px border1pxdotb_light">
                                <strong>Your NRIC</strong>
                            </td>
                            <td class="txtleft bg_grey_2 pad4px border2pxdotb">
                             <div class="padl10px">
                                <uc2:usrIdNumber ID="usrNRIC" runat="server" ValidationGroup="travel_insurance" />
                                </div>
                            </td>
                        </tr>
                        <tr id="trAdult2Name" style="display: none;">
                            <td class="txtleft pad4px border1pxdotb_light">
                                <strong>Adult 2's Name</strong>
                            </td>
                            <td class="txtleft bg_grey_2 pad4px border2pxdotb">
                             <div class="padl10px">
                                <asp:TextBox ID="txtAdult2Name" Width="250" MaxLength="80" runat="server" ValidationGroup="travel_insurance"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvInsured2" runat="server" ControlToValidate="txtAdult2Name"
                                    ValidationGroup="travel_insurance" ErrorMessage="" Text="" CssClass="validationErrorControl"></asp:RequiredFieldValidator>
                                    </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="txtleft pad4px">
                                <div style="position: absolute;">
                                    <asp:Image ID="imgProvider" runat="server" Width="145px" ImageUrl="~/images/public/logo/liberty.png" />
                                </div>
                            </td>
                            <td class="bg_grey_2 pad4px">
                            </td>
                        </tr>
                        <tr id="trBtnBuyNow">
                            <td class="txtleft pad4px">
                            </td>
                            <td class="txtleft bg_grey_2 pad4px">
                              <div class="padl10px">
                                <asp:Button runat="server" ID="btnBuyNow" CssClass="button_buy-now" OnClick="btnBuyNow_Click"
                                    OnClientClick="LoadValidationErrorCss();return CheckProvider();" ValidationGroup="travel_insurance" />
                                    </div>
                                <div id="divdisclaimer" style="width: 320px; font-size: 0.85em; margin: 0 auto; text-align: justify;
                                    padding: 7px;">
                                </div>
                            </td>
                        </tr>
                        <%--   <tr id="trBtnEmailMe" style="display: none;">
                            <td class="txtleft pad4px" valign="bottom">
                            </td>
                            <td class="bg_grey_2 pad4px">
                                <asp:Button runat="server" ID="btnEmailMe" ValidationGroup="travel_insurance" OnClick="btnEmailMe_Click"
                                    CssClass="button_email-me" OnClientClick="LoadValidationErrorCss(); return CheckEmailMeProvider();" />
                            </td>
                        </tr>--%>
                        <tr id="trBtnEmailThis" style="display: none;">
                            <td class="txtleft pad4px ">
                            </td>
                            <td class="txtleft bg_grey_2 pad4px ">
                                  <div class="padl10px">
                                    <asp:Button runat="server" ID="btnEmailThis" CssClass="button_email-this" OnClick="btnEmailThis_Click"
                                        ValidationGroup="travel_insurance" OnClientClick="LoadValidationErrorCss(); return CheckEmailMeProvider();" />
                               </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td class="bg_grey_2 w210px">
                                <div>
                                    <div class="curvebottomleft left">
                                    </div>
                                    <div class="curvebottomright right">
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td style="font-size: 11px;">
                                View CompareXpress! <a href="../terms/" target="_blank">Terms</a> and Comparexpress!
                                <a href="../privacy/" target="_blank">Policy</a>.
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
            <!-- Learn More Popup | End   -->
        </div>

        <script type="text/javascript">
            IncreaseProgress(95);

            function HidePanel() {
                document.getElementById('<%=pnlPopup.ClientID%>').style.display = 'none';
            }

            function ShowPopupDetails(_companyId, _imgurl, _resultid, _premium, _taid, _planname, _popuptype) {

                document.getElementById('<%=inputProviderId.ClientID %>').value = _companyId;
                document.getElementById('divdisclaimer').style.display = 'none';

                document.getElementById('<%=inputResultId.ClientID %>').value = _resultid;
                document.getElementById('<%=inputPremium.ClientID %>').value = _premium;
                document.getElementById('<%=inputTAId.ClientID %>').value = _taid;
                document.getElementById('<%=inputPlanName.ClientID %>').value = _planname;
                document.getElementById('<%=imgProvider.ClientID%>').src = _imgurl;

                document.getElementById('trYourNRIC').style.display = 'none';
                document.getElementById('trAdult2Name').style.display = 'none';
                document.getElementById('trYourTitle').style.display = 'none';

                document.getElementById('divPopup').style.height = '335px';
                document.getElementById('<%=pnlPopup.ClientID%>').style.height = '325px';

                document.getElementById('lblPlanName').innerHTML = _planname;
                document.getElementById('lblPremium').innerHTML = _premium;
                
                if (_popuptype == 'ET') {
                    document.getElementById('trBtnBuyNow').style.display = 'none';
                    //document.getElementById('trBtnEmailMe').style.display = 'none';
                    document.getElementById('trBtnEmailThis').style.display = '';

                }
                //                else if (_popuptype == 'EM') {
                //                    document.getElementById('trBtnBuyNow').style.display = 'none';
                //                    document.getElementById('trBtnEmailMe').style.display = '';
                //                    //document.getElementById('trBtnEmailThis').style.display = 'none';

                //                    document.getElementById('divPopup').style.height = '410px';
                //                    document.getElementById('<%=pnlPopup.ClientID%>').style.height = '400px';

                //                }
                else if (_popuptype == 'BN') {
                    document.getElementById('trBtnBuyNow').style.display = '';
                    //document.getElementById('trBtnEmailMe').style.display = 'none';
                    document.getElementById('trBtnEmailThis').style.display = 'none';


                    if (_companyId == "23" || _companyId == "34" || _companyId == "37" || _companyId == "38" || _companyId == "24") {
                        //hsbc, chinataiping, 1cover, directasia

                        document.getElementById('divdisclaimer').style.display = '';
                        document.getElementById('divPopup').style.height = '370px';
                        document.getElementById('<%=pnlPopup.ClientID%>').style.height = '365px';

                        if (_companyId == "23") {
                            document.getElementById('divdisclaimer').innerHTML = "* By clicking Buy Now, you will leave our website to access HSBC's website &amp; accept full responsibility for your own use.";
                        }
                        else if (_companyId == "34") {
                            document.getElementById('divdisclaimer').innerHTML = "* By clicking Buy Now, you will leave our website to access ChinaTaiping's website &amp; accept full responsibility for your own use.";
                            document.getElementById('trYourNRIC').style.display = '';

                            if (document.getElementById('<%=inputNoOfAdult.ClientID%>').value == '1') {
                                document.getElementById('trAdult2Name').style.display = 'none';

                                document.getElementById('divPopup').style.height = '430px';
                                document.getElementById('<%=pnlPopup.ClientID%>').style.height = '420px';
                            }
                            else {
                                document.getElementById('trAdult2Name').style.display = '';

                                document.getElementById('divPopup').style.height = '475px';
                                document.getElementById('<%=pnlPopup.ClientID%>').style.height = '465px';
                            }
                        }
                        else if (_companyId == "37") {
                            document.getElementById('divdisclaimer').innerHTML = "* By clicking Buy Now, you will leave our website to access 1Cover's website &amp; accept full responsibility for your own use.";
                        }
                        else if (_companyId == "38") {
                            document.getElementById('divdisclaimer').innerHTML = "* By clicking Buy Now, you will leave our website to access DirectAsia's website &amp; accept full responsibility for your own use.";
                        }
                        else if (_companyId == "24") {
                            document.getElementById('divdisclaimer').innerHTML = "* By clicking Buy Now, you will leave our website to access RSA's website &amp; accept full responsibility for your own use.";
                            document.getElementById('trYourTitle').style.display = '';
                            document.getElementById('divPopup').style.height = '460px';
                            document.getElementById('<%=pnlPopup.ClientID%>').style.height = '450px';
                        }
                    }
                }

                //alert(_companyId + ',' + _imgurl + ',' + _resultid + ',' + _annualpremium + ', ' + _userid + ', ' + _taid);


                var modpop = $find("mdlPopup");
                if (!modpop) { return; }
                modpop.show();
            }


            function CheckProvider() {

                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdPrefix'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_rfvIdNumber'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_revIdNumberLength'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdNumber'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdPostfix'), false);
                ValidatorEnable(document.getElementById('<%=rfvInsured2.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvTitle.ClientID%>'), false);

                if (document.getElementById('trYourNRIC').style.display == 'none' && document.getElementById('divdisclaimer').style.display == '') {

                    if (Page_ClientValidate('travel_insurance')) { CallRedirect(); return false; } else { return false; }
                }
                else if (document.getElementById('trYourNRIC').style.display == '') {

                    if (document.getElementById('<%=inputNoOfAdult.ClientID%>').value == '1') {
                        ValidatorEnable(document.getElementById('<%=rfvInsured2.ClientID%>'), false);
                    }
                    else {
                        ValidatorEnable(document.getElementById('<%=rfvInsured2.ClientID%>'), true);
                    }

                    ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdPrefix'), true);
                    ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_rfvIdNumber'), true);
                    ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_revIdNumberLength'), true);
                    ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdNumber'), true);
                    ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdPostfix'), true);

                    if (Page_ClientValidate('travel_insurance')) { CallRedirect(); return false; } else { return false; }
                }
                else if (document.getElementById('trYourTitle').style.display == '') {
                    ValidatorEnable(document.getElementById('<%=rfvTitle.ClientID%>'), true);

                    if (Page_ClientValidate('travel_insurance')) { CallRedirect(); return false; } else { return false; }
                }
                else {


                    if (Page_ClientValidate('travel_insurance')) { HidePanel(); return true; }
                }
            }

            function CallRedirect() {

                companyid = document.getElementById('<%=inputProviderId.ClientID %>').value;
                resultid = document.getElementById('<%=inputResultId.ClientID %>').value;
                annualpremium = document.getElementById('<%=inputPremium.ClientID %>').value;
                userid = document.getElementById('<%=inputUserId.ClientID %>').value;
                taid = document.getElementById('<%=inputTAId.ClientID %>').value;
                nric = '';
                ctname2 = '';
                title = '';

                if (companyid == "34") {
                    nric_prefix = document.getElementById('<%=usrNRIC.ClientID%>' + '_ddlIdPrefix').value;
                    nric_num = document.getElementById('<%=usrNRIC.ClientID%>' + '_txtIdNumber').value;
                    nric_suffix = document.getElementById('<%=usrNRIC.ClientID%>' + '_ddlIdPostfix').value;

                    nric = nric_prefix + nric_num + nric_suffix;
                    ctname2 = document.getElementById('<%=txtAdult2Name.ClientID%>').value;
                }
                if (companyid == "24") {
                    title = document.getElementById('<%=ddlTitle.ClientID %>').value;
                }

                HidePanel();
                var modpop = $find("mdlPopup");
                if (!modpop) { return; }
                modpop.hide();

                fullname = document.getElementById('<%=txtFullName.ClientID %>').value;
                mobile = document.getElementById('ctl00_ContentPlaceHolder1_txtMobileNo_txtPhoneNo').value;
                email = document.getElementById('<%=txtEmail.ClientID %>').value;

                window.open('../../travel-insurance/redirect.aspx?resultId=' + resultid + '&providerid=' + companyid + '&premium=' + annualpremium + '&userid=' + userid
            + '&taid=' + taid + '&nric=' + nric + '&name2=' + ctname2 + '&fullname=' + fullname + '&mobile=' + mobile + '&email=' + email + '&title=' + title);

            }

            function CheckEmailMeProvider() {
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdPrefix'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_rfvIdNumber'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_revIdNumberLength'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdNumber'), false);
                ValidatorEnable(document.getElementById('ctl00_ContentPlaceHolder1_usrNRIC_csvIdPostfix'), false);
                ValidatorEnable(document.getElementById('<%=rfvInsured2.ClientID%>'), false);


                if (Page_ClientValidate('travel_insurance')) { HidePanel(); return true; }
            }



            IncreaseProgress(100);
            HideLoading();
        </script>

    </div>
</asp:Content>

